package cc.mrbird.implementation.domain;

import cc.mrbird.common.annotation.ExportConfig;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Table(name="inspect_implementation")
public class InspectImplementation implements Serializable {
    /**
     * 单位ID、单位名称、应巡查此点的时间段、巡查时间、
     * 巡查人、巡查情况（正常、不正常）、如不正常提供问题说明、巡查点照片上传
     */
    private static final long serialVersionUID = 7780821232635887725L;
    @Id
    @GeneratedValue(generator = "JDBC")
    @Column(name = "unit_id")
    private Integer unit_id;

    @Column(name = "unit_name")
    @ExportConfig(value = "单位名称")
    private String unit_name;

    @Column(name = "inspect_period")
    @ExportConfig(value = "应巡查此点的时间段")
    private String inspect_period;

    @Column(name = "inspect_time")
    @ExportConfig(value = "巡查时间")
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
    private Date inspect_time;

    @Column(name = "inspect_people")
    @ExportConfig(value = "巡查人")
    private String inspect_people;

    @Column(name = "inspect_situation")
    @ExportConfig(value = "巡查情况")
    private String inspect_situation;  //正常、不正常

    @Column(name = "problem_specification")
    @ExportConfig(value = "问题说明")
    private String problem_specification;  //不正常问题说明

    @Column(name = "inspect_photo")
    @ExportConfig(value = "巡查点照片")
    private String inspect_photo;

    public Integer getUnit_id() {
        return unit_id;
    }

    public void setUnit_id(Integer unit_id) {
        this.unit_id = unit_id;
    }

    public String getUnit_name() {
        return unit_name;
    }

    public void setUnit_name(String unit_name) {
        this.unit_name = unit_name;
    }

    public String getInspect_period() {
        return inspect_period;
    }

    public void setInspect_period(String inspect_period) {
        this.inspect_period = inspect_period;
    }

    public Date getInspect_time() {
        return inspect_time;
    }

    public void setInspect_time(Date inspect_time) {
        this.inspect_time = inspect_time;
    }

    public String getInspect_people() {
        return inspect_people;
    }

    public void setInspect_people(String inspect_people) {
        this.inspect_people = inspect_people;
    }

    public String getInspect_situation() {
        return inspect_situation;
    }

    public void setInspect_situation(String inspect_situation) {
        this.inspect_situation = inspect_situation;
    }

    public String getProblem_specification() {
        return problem_specification;
    }

    public void setProblem_specification(String problem_specification) {
        this.problem_specification = problem_specification;
    }

    public String getInspect_photo() {
        return inspect_photo;
    }

    public void setInspect_photo(String inspect_photo) {
        this.inspect_photo = inspect_photo;
    }

    @Override
    public String toString() {
        return "InspectImplementation{" +
                "unit_id=" + unit_id +
                ", unit_name='" + unit_name + '\'' +
                ", inspect_period='" + inspect_period + '\'' +
                ", inspect_time=" + inspect_time +
                ", inspect_people='" + inspect_people + '\'' +
                ", inspect_situation='" + inspect_situation + '\'' +
                ", problem_specification='" + problem_specification + '\'' +
                ", inspect_photo='" + inspect_photo + '\'' +
                '}';
    }
}
